<ul>
<% @quizzes.each do |quiz| %>
  <li>
    <%if quiz.isquiz%>
    <h5>Quiz: <%= quiz.title %></h5>
    <%else%>
    <h5>Survey: <%= quiz.title %></h5>
    <%end%>

    <%if quiz.ready%>
    <%= link_to("Take Quiz", :controller => :takequiz, :action => :question, :quiz_id => quiz.id) %>
    <%else%>
    Not Ready 
    <%end%>
    <% if quiz.user.id == session[:user_id] %>  
    <%= link_to("Edit Quiz", :controller => :createquiz, :action => :editquiz, :quiz_id => quiz.id) %>
    <%= link_to("Delete Quiz", :controller => :createquiz, :action => :deletequiz, :quiz_id => quiz.id ) %>
    <% end %>
  </li>

<% end %>
</ul>

<%= link_to("Create Quiz", :controller => :createquiz, :action => :newquiz) %>
